﻿using CSCSN.DataAccess;
using CSCSN.EntitiyModels;
using CSCSN.ViewModels;
using CSCSN.ViewModels.RoleAndUser;
using CSCSN.ViewModelServices;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CSCSN.WebApplication.Helpers
{
    public static class StartupHelper
    {
        /// <summary>
        /// 扩展 IServiceCollection， 用于配置系统业务实体相关服务的依赖注入元素
        /// </summary>
        /// <param name="services"></param>
        public static void BusinessEntityDependencyInjector(this Microsoft.Extensions.DependencyInjection.IServiceCollection services)
        {
            #region ApplicationCommon 部分
            //services.AddScoped<IEntityRepository<BusinessImage>, EntityRepository<BusinessImage>>();
            //services.AddScoped<IEntityRepository<BusinessFile>, EntityRepository<BusinessFile>>();
            //services.AddScoped<IEntityRepository<BusinessVideo>, EntityRepository<BusinessVideo>>();

            //services.AddScoped<IEntityRepository<ApplicationMenuGroup>, EntityRepository<ApplicationMenuGroup>>();
            //services.AddScoped<IViewModelService<ApplicationMenuGroup, ApplicationMenuGroupVM>, ViewModelService<ApplicationMenuGroup, ApplicationMenuGroupVM>>();

            //services.AddScoped<IEntityRepository<ApplicationMenuItem>, EntityRepository<ApplicationMenuItem>>();
            //services.AddScoped<IViewModelService<ApplicationMenuItem, ApplicationMenuItemVM>, ViewModelService<ApplicationMenuItem, ApplicationMenuItemVM>>();

            services.AddScoped<IEntityRepository<ApplicationRole>, EntityRepository<ApplicationRole>>();
            services.AddScoped<IViewModelService<ApplicationRole, ApplicationRoleVM>, ViewModelService<ApplicationRole, ApplicationRoleVM>>();

            services.AddScoped<IEntityRepository<ApplicationUser>, EntityRepository<ApplicationUser>>();
            services.AddScoped<IViewModelService<ApplicationUser, ApplicationUserVM>, ViewModelService<ApplicationUser, ApplicationUserVM>>();

            services.AddScoped<IEntityRepository<ApplicationTask>, EntityRepository<ApplicationTask>>();
            services.AddScoped<IViewModelService<ApplicationTask, ApplicationTaskVM>, ViewModelService<ApplicationTask, ApplicationTaskVM>>();

            #endregion

            //#region 平台基础业务管理部分
            //services.AddScoped<IEntityRepository<Organization>, EntityRepository<Organization>>();
            //services.AddScoped<IViewModelService<Organization, OrganizationVM>, ViewModelService<Organization, OrganizationVM>>();

            //services.AddScoped<IEntityRepository<OrganizationBusinessProcess>, EntityRepository<OrganizationBusinessProcess>>();
            //services.AddScoped<IViewModelService<OrganizationBusinessProcess, OrganizationBusinessProcessVM>, ViewModelService<OrganizationBusinessProcess, OrganizationBusinessProcessVM>>();

            //services.AddScoped<IEntityRepository<OrganizationBusinessProcessWithWork>, EntityRepository<OrganizationBusinessProcessWithWork>>();
            ////services.AddScoped<IViewModelService<OrganizationBusinessProcessWithWork, OrganizationBusinessProcessWithWorkVM>, ViewModelService<OrganizationBusinessProcessWithWork, OrganizationBusinessProcessWithWorkVM>>();

            //services.AddScoped<IEntityRepository<OrganizationKPIType>, EntityRepository<OrganizationKPIType>>();
            //services.AddScoped<IViewModelService<OrganizationKPIType, OrganizationKPITypeVM>, ViewModelService<OrganizationKPIType, OrganizationKPITypeVM>>();

            //services.AddScoped<IEntityRepository<Department>, EntityRepository<Department>>();
            //services.AddScoped<IViewModelService<Department, DepartmentVM>, ViewModelService<Department, DepartmentVM>>();

            //services.AddScoped<IEntityRepository<DepartmentKPI>, EntityRepository<DepartmentKPI>>();
            //services.AddScoped<IViewModelService<DepartmentKPI, DepartmentKPIVM>, ViewModelService<DepartmentKPI, DepartmentKPIVM>>();

            //services.AddScoped<IEntityRepository<DepartmentKPIMetric>, EntityRepository<DepartmentKPIMetric>>();
            //services.AddScoped<IViewModelService<DepartmentKPIMetric, DepartmentKPIMetricVM>, ViewModelService<DepartmentKPIMetric, DepartmentKPIMetricVM>>();

            //services.AddScoped<IEntityRepository<DepartmentKPIMetricItem>, EntityRepository<DepartmentKPIMetricItem>>();
            ////services.AddScoped<IViewModelService<DepartmentKPIMetricItem, DepartmentKPIMetricItemVM>, ViewModelService<DepartmentKPIMetricItem, DepartmentKPIMetricItemVM>>();

            //services.AddScoped<IEntityRepository<Employee>, EntityRepository<Employee>>();
            //services.AddScoped<IViewModelService<Employee, EmployeeVM>, ViewModelService<Employee, EmployeeVM>>();

            //services.AddScoped<IEntityRepository<EmployeeKPIMetric>, EntityRepository<EmployeeKPIMetric>>();
            //services.AddScoped<IViewModelService<EmployeeKPIMetric, EmployeeKPIMetricVM>, ViewModelService<EmployeeKPIMetric, EmployeeKPIMetricVM>>();

            //services.AddScoped<IEntityRepository<EmployeeKPIMetricItem>, EntityRepository<EmployeeKPIMetricItem>>();

            //services.AddScoped<IEntityRepository<EmployeeWithPositionWork>, EntityRepository<EmployeeWithPositionWork>>();

            //services.AddScoped<IEntityRepository<Position>, EntityRepository<Position>>();
            //services.AddScoped<IViewModelService<Position, PositionVM>, ViewModelService<Position, PositionVM>>();

            //services.AddScoped<IEntityRepository<PositionWork>, EntityRepository<PositionWork>>();
            //services.AddScoped<IViewModelService<PositionWork, PositionWorkVM>, ViewModelService<PositionWork, PositionWorkVM>>();

            //services.AddScoped<IEntityRepository<PositionWorkKPI>, EntityRepository<PositionWorkKPI>>();
            //services.AddScoped<IViewModelService<PositionWorkKPI, PositionWorkKPIVM>, ViewModelService<PositionWorkKPI, PositionWorkKPIVM>>();

            //services.AddScoped<IEntityRepository<TransactionCenterRegister>, EntityRepository<TransactionCenterRegister>>();
            //services.AddScoped<IViewModelService<TransactionCenterRegister, TransactionCenterRegisterVM>, ViewModelService<TransactionCenterRegister, TransactionCenterRegisterVM>>();
            //#endregion

            //#region 平台产品管理部分
            //services.AddScoped<IEntityRepository<Commodity>, EntityRepository<Commodity>>();
            //services.AddScoped<IViewModelService<Commodity, CommodityVM>, ViewModelService<Commodity, CommodityVM>>();

            //services.AddScoped<IEntityRepository<CommodityCatalogue>, EntityRepository<CommodityCatalogue>>();
            //services.AddScoped<IViewModelService<CommodityCatalogue, CommodityCatalogueVM>, ViewModelService<CommodityCatalogue, CommodityCatalogueVM>>();

            //services.AddScoped<IEntityRepository<CommodityCategory>, EntityRepository<CommodityCategory>>();
            //services.AddScoped<IViewModelService<CommodityCategory, CommodityCategoryVM>, ViewModelService<CommodityCategory, CommodityCategoryVM>>();

            //services.AddScoped<IEntityRepository<CommoditySpecificationDictionary>, EntityRepository<CommoditySpecificationDictionary>>();
            //services.AddScoped<IViewModelService<CommoditySpecificationDictionary, CommoditySpecificationDictionaryVM>, ViewModelService<CommoditySpecificationDictionary, CommoditySpecificationDictionaryVM>>();

            //services.AddScoped<IEntityRepository<CommodityOriginAddress>, EntityRepository<CommodityOriginAddress>>();
            //services.AddScoped<IViewModelService<CommodityOriginAddress, CommodityOriginAddressVM>, ViewModelService<CommodityOriginAddress, CommodityOriginAddressVM>>();

            //services.AddScoped<IEntityRepository<CommodityPurchaseUnit>, EntityRepository<CommodityPurchaseUnit>>();
            //services.AddScoped<IViewModelService<CommodityPurchaseUnit, CommodityPurchaseUnitVM>, ViewModelService<CommodityPurchaseUnit, CommodityPurchaseUnitVM>>();

            //services.AddScoped<IEntityRepository<CommoditySaleUnit>, EntityRepository<CommoditySaleUnit>>();
            //services.AddScoped<IViewModelService<CommoditySaleUnit, CommoditySaleUnitVM>, ViewModelService<CommoditySaleUnit, CommoditySaleUnitVM>>();

            //#endregion

            //#region 供应商部分
            //services.AddScoped<IEntityRepository<VenderRegister>, EntityRepository<VenderRegister>>();
            //services.AddScoped<IViewModelService<VenderRegister, VenderRegisterVM>, ViewModelService<VenderRegister, VenderRegisterVM>>();

            //services.AddScoped<IEntityRepository<VenderDepartment>, EntityRepository<VenderDepartment>>();
            //services.AddScoped<IViewModelService<VenderDepartment, VenderDepartmentVM>, ViewModelService<VenderDepartment, VenderDepartmentVM>>();

            //services.AddScoped<IEntityRepository<VenderEmployee>, EntityRepository<VenderEmployee>>();
            //services.AddScoped<IViewModelService<VenderEmployee, VenderEmployeeVM>, ViewModelService<VenderEmployee, VenderEmployeeVM>>();

            //services.AddScoped<IEntityRepository<CommodityVender>, EntityRepository<CommodityVender>>();
            //services.AddScoped<IViewModelService<CommodityVender, CommodityVenderVM>, ViewModelService<CommodityVender, CommodityVenderVM>>();

            //services.AddScoped<IEntityRepository<VenderPosition>, EntityRepository<VenderPosition>>();
            //services.AddScoped<IViewModelService<VenderPosition, VenderPositionVM>, ViewModelService<VenderPosition, VenderPositionVM>>();

            //services.AddScoped<IEntityRepository<VenderCommodity>, EntityRepository<VenderCommodity>>();
            //services.AddScoped<IViewModelService<VenderCommodity, VenderCommodityVM>, ViewModelService<VenderCommodity, VenderCommodityVM>>();

            //services.AddScoped<IEntityRepository<VenderCommodityCatalogue>, EntityRepository<VenderCommodityCatalogue>>();
            //services.AddScoped<IViewModelService<VenderCommodityCatalogue, VenderCommodityCatalogueVM>, ViewModelService<VenderCommodityCatalogue, VenderCommodityCatalogueVM>>();

            //services.AddScoped<IEntityRepository<VenderCommodityCategory>, EntityRepository<VenderCommodityCategory>>();
            //services.AddScoped<IViewModelService<VenderCommodityCategory, VenderCommodityCategoryVM>, ViewModelService<VenderCommodityCategory, VenderCommodityCategoryVM>>();

            //services.AddScoped<IEntityRepository<VenderCommodityPurchaseUnit>, EntityRepository<VenderCommodityPurchaseUnit>>();
            //services.AddScoped<IViewModelService<VenderCommodityPurchaseUnit, VenderCommodityPurchaseUnitVM>, ViewModelService<VenderCommodityPurchaseUnit, VenderCommodityPurchaseUnitVM>>();

            //services.AddScoped<IEntityRepository<VenderCommoditySaleUnit>, EntityRepository<VenderCommoditySaleUnit>>();
            //services.AddScoped<IViewModelService<VenderCommoditySaleUnit, VenderCommoditySaleUnitVM>, ViewModelService<VenderCommoditySaleUnit, VenderCommoditySaleUnitVM>>();

            //#endregion

            //#region 采购商部分
            //services.AddScoped<IEntityRepository<PurchaserRegister>, EntityRepository<PurchaserRegister>>();
            //services.AddScoped<IViewModelService<PurchaserRegister, PurchaserRegisterVM>, ViewModelService<PurchaserRegister, PurchaserRegisterVM>>();

            //services.AddScoped<IEntityRepository<PurchaserDepartment>, EntityRepository<PurchaserDepartment>>();
            //services.AddScoped<IViewModelService<PurchaserDepartment, PurchaserDepartmentVM>, ViewModelService<PurchaserDepartment, PurchaserDepartmentVM>>();

            //services.AddScoped<IEntityRepository<PurchaserPosition>, EntityRepository<PurchaserPosition>>();
            //services.AddScoped<IViewModelService<PurchaserPosition, PurchaserPositionVM>, ViewModelService<PurchaserPosition, PurchaserPositionVM>>();

            //services.AddScoped<IEntityRepository<PurchaserEmployee>, EntityRepository<PurchaserEmployee>>();
            //services.AddScoped<IViewModelService<PurchaserEmployee, PurchaserEmployeeVM>, ViewModelService<PurchaserEmployee, PurchaserEmployeeVM>>();

            //services.AddScoped<IEntityRepository<PurchaseOrder>, EntityRepository<PurchaseOrder>>();
            //services.AddScoped<IViewModelService<PurchaseOrder, PurchaseOrderVM>, ViewModelService<PurchaseOrder, PurchaseOrderVM>>();

            //services.AddScoped<IEntityRepository<PurchaseOrderTemplate>, EntityRepository<PurchaseOrderTemplate>>();
            //services.AddScoped<IViewModelService<PurchaseOrderTemplate, PurchaseOrderTemplateVM>, ViewModelService<PurchaseOrderTemplate, PurchaseOrderTemplateVM>>();

            //services.AddScoped<IEntityRepository<PurchaseOrderItemTemplate>, EntityRepository<PurchaseOrderItemTemplate>>();
            //services.AddScoped<IViewModelService<PurchaseOrderItemTemplate, PurchaseOrderItemTemplateVM>, ViewModelService<PurchaseOrderItemTemplate, PurchaseOrderItemTemplateVM>>();

            //services.AddScoped<IEntityRepository<CommodityPurchaser>, EntityRepository<CommodityPurchaser>>();
            //services.AddScoped<IViewModelService<CommodityPurchaser, CommodityPurchaserVM>, ViewModelService<CommodityPurchaser, CommodityPurchaserVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityCatalogue>, EntityRepository<PurchaserCommodityCatalogue>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityCatalogue, PurchaserCommodityCatalogueVM>, ViewModelService<PurchaserCommodityCatalogue, PurchaserCommodityCatalogueVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityCategory>, EntityRepository<PurchaserCommodityCategory>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityCategory, PurchaserCommodityCategoryVM>, ViewModelService<PurchaserCommodityCategory, PurchaserCommodityCategoryVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodity>, EntityRepository<PurchaserCommodity>>();
            //services.AddScoped<IViewModelService<PurchaserCommodity, PurchaserCommodityVM>, ViewModelService<PurchaserCommodity, PurchaserCommodityVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityPurchaseUnit>, EntityRepository<PurchaserCommodityPurchaseUnit>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityPurchaseUnit, PurchaserCommodityPurchaseUnitVM>, ViewModelService<PurchaserCommodityPurchaseUnit, PurchaserCommodityPurchaseUnitVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommoditySaleUnit>, EntityRepository<PurchaserCommoditySaleUnit>>();
            //services.AddScoped<IViewModelService<PurchaserCommoditySaleUnit, PurchaserCommoditySaleUnitVM>, ViewModelService<PurchaserCommoditySaleUnit, PurchaserCommoditySaleUnitVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityUserFavorite>, EntityRepository<PurchaserCommodityUserFavorite>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityUserFavorite, PurchaserCommodityUserFavoriteVM>, ViewModelService<PurchaserCommodityUserFavorite, PurchaserCommodityUserFavoriteVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundOrder>, EntityRepository<PurchaseCompoundOrder>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundOrder, PurchaseCompoundOrderVM>, ViewModelService<PurchaseCompoundOrder, PurchaseCompoundOrderVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundOrderItem>, EntityRepository<PurchaseCompoundOrderItem>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundOrderItem, PurchaseCompoundOrderItemVM>, ViewModelService<PurchaseCompoundOrderItem, PurchaseCompoundOrderItemVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundOrderPathNode>, EntityRepository<PurchaseCompoundOrderPathNode>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundOrderPathNode, PurchaseCompoundOrderPathNodeVM>, ViewModelService<PurchaseCompoundOrderPathNode, PurchaseCompoundOrderPathNodeVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundOrderWithPurchaseOrder>, EntityRepository<PurchaseCompoundOrderWithPurchaseOrder>>();

            //services.AddScoped<IEntityRepository<PurchaseCommodityWithVender>, EntityRepository<PurchaseCommodityWithVender>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityOriginAddress>, EntityRepository<PurchaserCommodityOriginAddress>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityOriginAddress, PurchaserCommodityOriginAddressVM>, ViewModelService<PurchaserCommodityOriginAddress, PurchaserCommodityOriginAddressVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommoditySpecification>, EntityRepository<PurchaserCommoditySpecification>>();
            //services.AddScoped<IViewModelService<PurchaserCommoditySpecification, PurchaserCommoditySpecificationVM>, ViewModelService<PurchaserCommoditySpecification, PurchaserCommoditySpecificationVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommoditySpecificationDictionary>, EntityRepository<PurchaserCommoditySpecificationDictionary>>();
            //services.AddScoped<IViewModelService<PurchaserCommoditySpecificationDictionary, PurchaserCommoditySpecificationDictionaryVM>, ViewModelService<PurchaserCommoditySpecificationDictionary, PurchaserCommoditySpecificationDictionaryVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityWithOriginAddress>, EntityRepository<PurchaserCommodityWithOriginAddress>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityQuotation>, EntityRepository<PurchaserCommodityQuotation>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityQuotation, PurchaserCommodityQuotationVM>, ViewModelService<PurchaserCommodityQuotation, PurchaserCommodityQuotationVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityQuotationItem>, EntityRepository<PurchaserCommodityQuotationItem>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundOrderPath>, EntityRepository<PurchaseCompoundOrderPath>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundOrderPath, PurchaseCompoundOrderPathVM>, ViewModelService<PurchaseCompoundOrderPath, PurchaseCompoundOrderPathVM>>();

            //services.AddScoped<IEntityRepository<PuchaserCustomer>, EntityRepository<PuchaserCustomer>>();
            //services.AddScoped<IViewModelService<PuchaserCustomer, PuchaserCustomerVM>, ViewModelService<PuchaserCustomer, PuchaserCustomerVM>>();

            //services.AddScoped<IEntityRepository<PuchaserCustomerDepartment>, EntityRepository<PuchaserCustomerDepartment>>();
            //services.AddScoped<IViewModelService<PuchaserCustomerDepartment, PuchaserCustomerDepartmentVM>, ViewModelService<PuchaserCustomerDepartment, PuchaserCustomerDepartmentVM>>();

            //services.AddScoped<IEntityRepository<PuchaserCustomerEmployee>, EntityRepository<PuchaserCustomerEmployee>>();
            //services.AddScoped<IViewModelService<PuchaserCustomerEmployee, PuchaserCustomerEmployeeVM>, ViewModelService<PuchaserCustomerEmployee, PuchaserCustomerEmployeeVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomerCommodity>, EntityRepository<PurchaserCustomerCommodity>>();
            //services.AddScoped<IViewModelService<PurchaserCustomerCommodity, PurchaserCustomerCommodityVM>, ViewModelService<PurchaserCustomerCommodity, PurchaserCustomerCommodityVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomerApplicationMenuItem>, EntityRepository<PurchaserCustomerApplicationMenuItem>>();
            //services.AddScoped<IViewModelService<PurchaserCustomerApplicationMenuItem, PurchaserCustomerApplicationMenuItemVM>, ViewModelService<PurchaserCustomerApplicationMenuItem, PurchaserCustomerApplicationMenuItemVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityVender>, EntityRepository<PurchaserCommodityVender>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityVender, PurchaserCommodityVenderVM>, ViewModelService<PurchaserCommodityVender, PurchaserCommodityVenderVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomCommodityEffectiveFrequencyOrderTemplate>, EntityRepository<PurchaserCustomCommodityEffectiveFrequencyOrderTemplate>>();
            //services.AddScoped<IViewModelService<PurchaserCustomCommodityEffectiveFrequencyOrderTemplate, PurchaserCustomCommodityEffectiveFrequencyOrderTemplateVM>, ViewModelService<PurchaserCustomCommodityEffectiveFrequencyOrderTemplate, PurchaserCustomCommodityEffectiveFrequencyOrderTemplateVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomCommodityOrderTemplate>, EntityRepository<PurchaserCustomCommodityOrderTemplate>>();
            //services.AddScoped<IViewModelService<PurchaserCustomCommodityOrderTemplate, PurchaserCustomCommodityOrderTemplateVM>, ViewModelService<PurchaserCustomCommodityOrderTemplate, PurchaserCustomCommodityOrderTemplateVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomDefinedOrderTemplate>, EntityRepository<PurchaserCustomDefinedOrderTemplate>>();
            //services.AddScoped<IViewModelService<PurchaserCustomDefinedOrderTemplate, PurchaserCustomDefinedOrderTemplateVM>, ViewModelService<PurchaserCustomDefinedOrderTemplate, PurchaserCustomDefinedOrderTemplateVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomerOrderTemplateItem>, EntityRepository<PurchaserCustomerOrderTemplateItem>>();
            //services.AddScoped<IViewModelService<PurchaserCustomerOrderTemplateItem, PurchaserCustomerOrderTemplateItemVM>, ViewModelService<PurchaserCustomerOrderTemplateItem, PurchaserCustomerOrderTemplateItemVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomerOrder>, EntityRepository<PurchaserCustomerOrder>>();
            //services.AddScoped<IViewModelService<PurchaserCustomerOrder, PurchaserCustomerOrderVM>, ViewModelService<PurchaserCustomerOrder, PurchaserCustomerOrderVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCustomerOrderItem>, EntityRepository<PurchaserCustomerOrderItem>>();
            //services.AddScoped<IViewModelService<PurchaserCustomerOrderItem, PurchaserCustomerOrderItemVM>, ViewModelService<PurchaserCustomerOrderItem, PurchaserCustomerOrderItemVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityVenderDepartment>, EntityRepository<PurchaserCommodityVenderDepartment>>();
            //services.AddScoped<IViewModelService<PurchaserCommodityVenderDepartment, PurchaserCommodityVenderDepartmentVM>, ViewModelService<PurchaserCommodityVenderDepartment, PurchaserCommodityVenderDepartmentVM>>();

            //services.AddScoped<IEntityRepository<PuchaserVenderEmployee>, EntityRepository<PuchaserVenderEmployee>>();
            //services.AddScoped<IViewModelService<PuchaserVenderEmployee, PuchaserVenderEmployeeVM>, ViewModelService<PuchaserVenderEmployee, PuchaserVenderEmployeeVM>>();

            //services.AddScoped<IEntityRepository<PurchaserVenderCommodity>, EntityRepository<PurchaserVenderCommodity>>();
            //services.AddScoped<IViewModelService<PurchaserVenderCommodity, PurchaserVenderCommodityVM>, ViewModelService<PurchaserVenderCommodity, PurchaserVenderCommodityVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommoditySubVender>, EntityRepository<PurchaserCommoditySubVender>>();
            //services.AddScoped<IViewModelService<PurchaserCommoditySubVender, PurchaserCommoditySubVenderVM>, ViewModelService<PurchaserCommoditySubVender, PurchaserCommoditySubVenderVM>>();

            //services.AddScoped<IEntityRepository<PurchaserSelfPurchaseServiceDepartment>, EntityRepository<PurchaserSelfPurchaseServiceDepartment>>();
            //services.AddScoped<IViewModelService<PurchaserSelfPurchaseServiceDepartment, PurchaserSelfPurchaseServiceDepartmentVM>, ViewModelService<PurchaserSelfPurchaseServiceDepartment, PurchaserSelfPurchaseServiceDepartmentVM>>();

            //services.AddScoped<IEntityRepository<PurchaserCommodityWithOrderPurchaseUnit>, EntityRepository<PurchaserCommodityWithOrderPurchaseUnit>>();

            //services.AddScoped<IEntityRepository<PurchaserApplicationMenuItem>, EntityRepository<PurchaserApplicationMenuItem>>();
            //services.AddScoped<IViewModelService<PurchaserApplicationMenuItem, PurchaserApplicationMenuItemVM>, ViewModelService<PurchaserApplicationMenuItem, PurchaserApplicationMenuItemVM>>();

            //services.AddScoped<IEntityRepository<PurchaserServiceGroupEmployee>, EntityRepository<PurchaserServiceGroupEmployee>>();

            //services.AddScoped<IEntityRepository<PurchaseServiceGroup>, EntityRepository<PurchaseServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<PurchaseServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<PurchaseServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<BillServiceGroup>, EntityRepository<BillServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<BillServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<BillServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<CheckListServiceGroup>, EntityRepository<CheckListServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<CheckListServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<CheckListServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<CommodityPriceServiceGroup>, EntityRepository<CommodityPriceServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<CommodityPriceServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<CommodityPriceServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<CustomerPriceServiceGroup>, EntityRepository<CustomerPriceServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<CustomerPriceServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<CustomerPriceServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<CustomerServiceGroup>, EntityRepository<CustomerServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<CustomerServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<CustomerServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<LogisticServiceGroup>, EntityRepository<LogisticServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<LogisticServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<LogisticServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<PublicPriceServiceGroup>, EntityRepository<PublicPriceServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<PublicPriceServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<PublicPriceServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<SortingCommodityServiceGroup>, EntityRepository<SortingCommodityServiceGroup>>();
            //services.AddScoped<IPurchaserServiceGroupViewModelService<SortingCommodityServiceGroup, PurchaserServiceGroupBaseVM>, PurchaserServiceGroupViewModelService<SortingCommodityServiceGroup, PurchaserServiceGroupBaseVM>>();

            //services.AddScoped<IEntityRepository<PurchaserWarehouse>, EntityRepository<PurchaserWarehouse>>();
            //services.AddScoped<IViewModelService<PurchaserWarehouse, PurchaserWarehouseVM>, ViewModelService<PurchaserWarehouse, PurchaserWarehouseVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundCustomerOrderPathNode>, EntityRepository<PurchaseCompoundCustomerOrderPathNode>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundCustomerOrderPathNode, PurchaseCompoundCustomerOrderPathNodeVM>, ViewModelService<PurchaseCompoundCustomerOrderPathNode, PurchaseCompoundCustomerOrderPathNodeVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundCustomerOrder>, EntityRepository<PurchaseCompoundCustomerOrder>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundCustomerOrder, PurchaseCompoundCustomerOrderVM>, ViewModelService<PurchaseCompoundCustomerOrder, PurchaseCompoundCustomerOrderVM>>();

            //services.AddScoped<IEntityRepository<PurchaseCompoundCustomerOrderItem>, EntityRepository<PurchaseCompoundCustomerOrderItem>>();
            //services.AddScoped<IViewModelService<PurchaseCompoundCustomerOrderItem, PurchaseCompoundCustomerOrderItemVM>, ViewModelService<PurchaseCompoundCustomerOrderItem, PurchaseCompoundCustomerOrderItemVM>>();

            //services.AddScoped<IEntityRepository<DailySortingInformationItem>, EntityRepository<DailySortingInformationItem>>();
            //services.AddScoped<IViewModelService<DailySortingInformationItem, DailySortingInformationItemVM>, ViewModelService<DailySortingInformationItem, DailySortingInformationItemVM>>();

            //#endregion

            //#region 物流服务公司
            //services.AddScoped<IEntityRepository<LogisticFirmMemberRegister>, EntityRepository<LogisticFirmMemberRegister>>();
            //services.AddScoped<IViewModelService<LogisticFirmMemberRegister, LogisticFirmMemberRegisterVM>, ViewModelService<LogisticFirmMemberRegister, LogisticFirmMemberRegisterVM>>();

            //services.AddScoped<IEntityRepository<LogisticsApplicationMenuItem>, EntityRepository<LogisticsApplicationMenuItem>>();
            //services.AddScoped<IViewModelService<LogisticsApplicationMenuItem, LogisticsApplicationMenuItemVM>, ViewModelService<LogisticsApplicationMenuItem, LogisticsApplicationMenuItemVM>>();

            //services.AddScoped<IEntityRepository<LogisticFirm>, EntityRepository<LogisticFirm>>();
            //services.AddScoped<IViewModelService<LogisticFirm, LogisticFirmVM>, ViewModelService<LogisticFirm, LogisticFirmVM>>();

            //services.AddScoped<IEntityRepository<LogisticFirmDepartment>, EntityRepository<LogisticFirmDepartment>>();
            //services.AddScoped<IViewModelService<LogisticFirmDepartment, LogisticFirmDepartmentVM>, ViewModelService<LogisticFirmDepartment, LogisticFirmDepartmentVM>>();

            //services.AddScoped<IEntityRepository<LogisticFirmEmployee>, EntityRepository<LogisticFirmEmployee>>();
            //services.AddScoped<IViewModelService<LogisticFirmEmployee, LogisticFirmEmployeeVM>, ViewModelService<LogisticFirmEmployee, LogisticFirmEmployeeVM>>();

            //services.AddScoped<IEntityRepository<LogisticFirmPosition>, EntityRepository<LogisticFirmPosition>>();
            //services.AddScoped<IViewModelService<LogisticFirmPosition, LogisticFirmPositionVM>, ViewModelService<LogisticFirmPosition, LogisticFirmPositionVM>>();

            //services.AddScoped<IEntityRepository<TransportType>, EntityRepository<TransportType>>();
            //services.AddScoped<IViewModelService<TransportType, TransportTypeVM>, ViewModelService<TransportType, TransportTypeVM>>();

            //services.AddScoped<IEntityRepository<TransportIdentificationType>, EntityRepository<TransportIdentificationType>>();
            //services.AddScoped<IViewModelService<TransportIdentificationType, TransportIdentificationTypeVM>, ViewModelService<TransportIdentificationType, TransportIdentificationTypeVM>>();

            //services.AddScoped<IEntityRepository<Transport>, EntityRepository<Transport>>();
            //services.AddScoped<IViewModelService<Transport, TransportVM>, ViewModelService<Transport, TransportVM>>();

            //services.AddScoped<IEntityRepository<TransportLog>, EntityRepository<TransportLog>>();
            //services.AddScoped<IViewModelService<TransportLog, TransportLogVM>, ViewModelService<TransportLog, TransportLogVM>>();

            //services.AddScoped<IEntityRepository<PackingContainer>, EntityRepository<PackingContainer>>();
            //services.AddScoped<IViewModelService<PackingContainer, PackingContainerVM>, ViewModelService<PackingContainer, PackingContainerVM>>();
            //#endregion

            //#region 门户基础信息维护管理
            //services.AddScoped<IEntityRepository<ArticleTopic>, EntityRepository<ArticleTopic>>();
            //services.AddScoped<IViewModelService<ArticleTopic, ArticleTopicVM>, ViewModelService<ArticleTopic, ArticleTopicVM>>();

            //services.AddScoped<IEntityRepository<ArticleType>, EntityRepository<ArticleType>>();
            //services.AddScoped<IViewModelService<ArticleType, ArticleTypeVM>, ViewModelService<ArticleType, ArticleTypeVM>>();

            //services.AddScoped<IEntityRepository<Article>, EntityRepository<Article>>();
            //services.AddScoped<IViewModelService<Article, ArticleVM>, ViewModelService<Article, ArticleVM>>();

            //services.AddScoped<IEntityRepository<ArticleInTopic>, EntityRepository<ArticleInTopic>>();
            //services.AddScoped<IEntityRepository<ArticleInType>, EntityRepository<ArticleInType>>();
            //#endregion

            //#region Demo 部分
            //services.AddScoped<IEntityRepository<DemoEntityParent>, EntityRepository<DemoEntityParent>>();
            //services.AddScoped<IViewModelService<DemoEntityParent, DemoEntityParentVM>, ViewModelService<DemoEntityParent, DemoEntityParentVM>>();

            //services.AddScoped<IEntityRepository<DemoCommon>, EntityRepository<DemoCommon>>();
            //services.AddScoped<IViewModelService<DemoCommon, DemoCommonVM>, ViewModelService<DemoCommon, DemoCommonVM>>();

            //services.AddScoped<IEntityRepository<DemoItemForMultiSelect>, EntityRepository<DemoItemForMultiSelect>>();
            //services.AddScoped<IViewModelService<DemoItemForMultiSelect, DemoItemForMultiSelectVM>, ViewModelService<DemoItemForMultiSelect, DemoItemForMultiSelectVM>>();

            //services.AddScoped<IEntityRepository<DemoEntity>, EntityRepository<DemoEntity>>();
            //services.AddScoped<IViewModelService<DemoEntity, DemoEntityVM>, ViewModelService<DemoEntity, DemoEntityVM>>();
            //#endregion

            //#region LionPanBusiness 相关
            //services.AddScoped<IEntityRepository<ProductType>, EntityRepository<ProductType>>();
            //services.AddScoped<IViewModelService<ProductType, ProductTypeVM>, ViewModelService<ProductType, ProductTypeVM>>();
            //#endregion

            //#region LuoZiYuBusiness 相关
            //services.AddScoped<IEntityRepository<BookType>, EntityRepository<BookType>>();
            //services.AddScoped<IViewModelService<BookType, BookTypeVM>, ViewModelService<BookType, BookTypeVM>>();
            //#endregion
            //#region ShaoRongZongBusiness 相关
            //services.AddScoped<IEntityRepository<FoodType>, EntityRepository<FoodType>>();
            //services.AddScoped<IViewModelService<FoodType, FoodTypeVM>, ViewModelService<FoodType, FoodTypeVM>>();
            //#endregion
        }

    }
}
